ΕΠΙΣΤΡΟΦΗ
Υλοποίηση μέσω γλώσσας Wolfram στο WLJS Notebook .
Ανάπτυγμα σε σειρές
Σειρές Taylor
Clear["Global`*"]
f[x_] := x^2 + 5 Sin[x]
Series[f[x], {x, Pi, 10}]
Series[f[x], {x, 0, 10}]
Normal[Series[f[x], {x, 0, 10}]]
fs10 = Normal[Series[f[x], {x, 0, 10}]];
fs[x_] := Evaluate[fs10]
fs[2 x]
fs[3]
fsN[n_] := Normal[Series[f[x], {x, 0, n}]];
functList = Table[fsN[n], {n, 1, 4}]
Plot[{f[x], Evaluate[functList]}, {x, -6, 6}, PlotLegends -> functList]
Σειρές Fourier
Αυτόματη σειρά
Clear["Global`*"]
(*Πρέπει να 'χει συμμετρία περί του 0 το πεδίο ορισμού*)
f[x_] := Which[-3 < x <= 2, x^2, 2 < x < 3, 2 x + 2]
periodos = 6;
fH = FourierTrigSeries[f[x], x, 10, FourierParameters -> {1, 2 Pi/periodos}]
fHat[x_] := Evaluate[fH]
Plot[{f[x], fHat[x]}, {x, -4, 4}]
fsN[n_] := FourierTrigSeries[f[x], x, n, FourierParameters -> {1, 2 Pi/periodos}];
functList = Table[fsN[n], {n, 1, 4}] // Simplify
Plot[{f[x], Evaluate[functList]}, {x, 0, periodos}, PlotLegends -> functList]
Αυτόματοι συντελεστές
ypologismosAn[synart_, periodos_, n_] :=
Which[n > 0,
Simplify[
FourierCoefficient[synart, x, n, FourierParameters -> {1, 2*Pi/periodos}] +
FourierCoefficient[synart, x, -n, FourierParameters -> {1, 2*Pi/periodos}]], n == 0,
1/2 Simplify[
FourierCoefficient[synart, x, n, FourierParameters -> {1, 2*Pi/periodos}] +
FourierCoefficient[synart, x, -n, FourierParameters -> {1, 2*Pi/periodos}]]]
ypologismosBn[synart_, periodos_, n_] :=
Simplify[
I*FourierCoefficient[synart, x, n, FourierParameters -> {1, 2*Pi/periodos}] -
I*FourierCoefficient[synart, x, -n, FourierParameters -> {1, 2*Pi/periodos}]]
ypologismosAn[f[x], 6, 0]
ypologismosAn[f[x], 6, 1]
ypologismosBn[f[x], 6, 1]
Συντελεστές στο χέρι
syntelestes[synart_, periodos_, k0_] :=
Module[{f = synart, L = periodos, k = k0, a, b},
a[n_] :=
Which[n == 0, (1/L)*Integrate[f, {x, -L/2, L/2}], n > 0, (2/L)*Integrate[f*Cos[(2 n*Pi*x)/L], {x, -L/2, L/2}]];
b[n_] := (2/L)*Integrate[f*Sin[(2 n*Pi*x)/L], {x, -L/2, L/2}];
{Simplify[a[k]], Simplify[b[k]]}]
syntelestes[f[x], 6, 0]
syntelestes[f[x], 6, 1]
syntelestes[f[x], 6, 2]
syntelestes[f[x], 6, 3]
Static web notebook
Author kkoud
Created Mon 6 Oct 2025 12:50:35
Outline
Κώστας Κούδας | © 2025